STEP2_BIN_DEP:= fsimginfo.py step2.asm step2_logprint.asm step2_readdisk.asm step2_findbootbin.asm


all: gen_fs.img
		qemu-system-x86_64 -drive file=gen_fs.img,format=raw -m 2048 -monitor stdio

gen_fs.img: $(STEP2_BIN_DEP)
		python3 $(word 1,$^)
		nasm $(word 2,$^) -f bin -o gen_step2.bin
		dd if=gen_step2.bin of=gen_disk.raw bs=512 count=1 conv=notrunc
		dd if=gen_disk.raw of=$@ bs=1 count=448 seek=62 conv=notrunc

clean: 
	rm gen_* -f
	